package com.chase.framerwork.entity;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 菜单Entity
 * 
 * @author Chase
 * 
 */
@Entity
@Table(name = "SYS_MENU")
public class Menu extends BaseEntity
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6741976080604789465L;

	private Menu parent;
	
	private Set<Menu> children;
	
	private String name;
	private String action;
	private Integer status;
	private Integer isLeaf;
	private Integer isParent;
	private Long orderSN;
	private String icon;
	
	@ManyToOne
	@JoinColumn(name="pid")
	public Menu getParent()
    {
    	return parent;
    }
	public void setParent(Menu parent)
    {
    	this.parent = parent;
    }
	
	@OneToMany(mappedBy="parent")
	public Set<Menu> getChildren()
    {
    	return children;
    }
	public void setChildren(Set<Menu> children)
    {
    	this.children = children;
    }
	public String getName()
    {
    	return name;
    }
	public void setName(String name)
    {
    	this.name = name;
    }
	public String getAction()
    {
    	return action;
    }
	public void setAction(String action)
    {
    	this.action = action;
    }
	public Integer getStatus()
    {
    	return status;
    }
	public void setStatus(Integer status)
    {
    	this.status = status;
    }
	public Integer getIsLeaf()
    {
    	return isLeaf;
    }
	public void setIsLeaf(Integer isLeaf)
    {
    	this.isLeaf = isLeaf;
    }
	public Integer getIsParent()
    {
    	return isParent;
    }
	public void setIsParent(Integer isParent)
    {
    	this.isParent = isParent;
    }
	public Long getOrderSN()
    {
    	return orderSN;
    }
	public void setOrderSN(Long orderSN)
    {
    	this.orderSN = orderSN;
    }
	public String getIcon()
    {
    	return icon;
    }
	public void setIcon(String icon)
    {
    	this.icon = icon;
    }
}
